//
// 作者：AKA_GGbond
// 时间：2025/7/15
// 邮箱：evain_wl@163.com
//

#ifndef CBB_W_CUSWIDGET_H
#define CBB_W_CUSWIDGET_H
#include <QWidget>
#include "../stdafx.h"

class W_CusWidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY_CREATE(QColor,lineColor)
    Q_PROPERTY_CREATE(QColor,rectColor)
    Q_PROPERTY_CREATE(QColor,shadowStartColor)
    Q_PROPERTY_CREATE(QColor,shadowStopColor)

public:
    W_CusWidget(QWidget *parent = nullptr);
    ~W_CusWidget()override;

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    //绘制背景
    void drawBackground(const QRect & rect,QPainter * painter);
    //绘制拐角线
    void drawLines(const QRect & rect,QPainter *painter);

private:
    int lightLineLength{30};//拐角的线的长度
    int shadowLength{40};//阴影长度
};


#endif //CBB_W_CUSWIDGET_H
